from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_restful import Api

db = SQLAlchemy()
api = Api()

def create_app():
    app = Flask(__name__)
    app.config.from_object('OAPro.settings.BaseConfig')

    db.init_app(app)

    from OAPro.Blueprint.views import blueprint
    api.init_app(blueprint)

    app.register_blueprint(blueprint,url_prefix = "/blueprint")

    return app

